package com.acerola.rocketmqspringboot.controller;

import com.acerola.rocketmqspringboot.pojo.User;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @program: RocketMQSpringboot
 * @description:
 * @author: Acerola
 * @create: 2022-10-02 10:30
 **/
@Service
@RocketMQMessageListener(topic = "demo-topic", consumerGroup = "demo_consumer")
public class DemoConsumers1 implements RocketMQListener<User> {
    @Override
    public void onMessage(User user) {
        System.out.println("Consumers1接收消息:" + user.toString());
    }
}
